﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .div1{width: 200px;height: 100px;
        background-color: #ccc;
        border:1px solid;}
    </style>
	<script>
		var oDiv=document.getElementById('div1');
		function toB()
		{oDiv.style.width='100px';
			}
	</script>
</head>
<body>
  <input type="button" value="按钮" onClick="toB()">

  <div class="div1">
     为了您的信息安全，请不要随便在
     公共场合登陆。
  </div>
</body>
</html>